package com.appkubes.mall.restful.application.taobao.goods.classify.controller;

import com.appkubes.common.Response;
import com.appkubes.mall.core.controller.BaseMallTaobaoGoodsClassifyController;
import com.appkubes.mall.core.entity.MallTaobaoGoodsClassify;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Lin Jiaming
 * @Date: 2020/3/7 22:32
 * @Description:
 */
@Api(tags = "淘宝商品分类模块")
@RestController
@RequestMapping("taobao/goods/classify")
public class TaobaoGoodsClassifyController extends BaseMallTaobaoGoodsClassifyController {

    /**
     * 商品分类
     */
    @ApiOperation("商品分类")
    @PostMapping(value = "/classifyList")
    public Response classifyList() {
        MallTaobaoGoodsClassify taobaoGoodsClassify = new MallTaobaoGoodsClassify();
        taobaoGoodsClassify.setSuperiorCid(0);
        List<MallTaobaoGoodsClassify> goodsClassifyList = this.baseService.selectListByEntity(taobaoGoodsClassify);
        return Response.success(goodsClassifyList);
    }
}
